{extend name="base" /}
{block name="title"}后台管理-用户管理{/block}
{block name="main"}
<div class="widget-body" style="padding-bottom: 85px;">
    <table id="user" class="table table-striped table-bordered dataTable" num="{$num}">
        <thead>
            <tr>
                <th>昵称</th>
                <th>学号</th>
                <th>电话</th>
                <th>学校</th>
                <th>状态</th>
                <th></th>
            </tr>
        </thead>
        <tbody class="userlist">
            {volist name="res" id="vo"}
            <tr>
                <td>{$vo.name}</td>
                <td>{$vo.sNumber}</td>
                <td>{$vo.teleNumber}</td>
                <td>{$vo.schoolName}</td>
                <td>
                    {if condition="$vo.status == 0"}
                    <span class="label label-success slabel" data-uid="{$vo.userId}" data-status='0'>正常</span>
                    {else/}
                    <span class="label slabel" data-uid="{$vo.userId}" data-status='1'>禁用</span>
                    {/if}
                </td>
                <td>
                    <div class="btn-group">
                        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                            操作
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="{:url('resetpw',['uid'=>$vo.userId])}"><i class="icon-wrench"></i> 重置密码</a>
                            </li>
                            <li><a href="{:url('edituser',['uid'=>$vo.userId])}"><i class="icon-edit"></i> 修改</a></li>
                            <li><a href="{:url('deluser',['uid'=>$vo.userId])}"><i class="icon-trash"></i> 删除</a></li>
                        </ul>
                    </div>
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
</div> <!-- /widget-body -->
<h5 ></h5>
<script src="__STATIC__/assets/js/jquery.min.js"></script>
<script>
    $('.widget-header').empty();
    var num  = $("table[num]").attr("num");
    if(num!=0)
    $('.widget-header').append("<h6 style='margin: 15px;color:red;'>已找到"+num+"个结果:</h6>");
    else{
    $('.widget-body').empty();
    $('.widget-body').append("<h5 style='color:red;'>没有找到任何信息</h5>");
    }
</script>

{/block}
